package com.example.sulingorder.feign;

import com.xiao.sulingpublic.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author: 1322127758@qq.com
 * @date: 2022/3/24 20:36
 * @作用:
 */
@FeignClient("suling-product")
public interface ProductFeign {
    /**
     * 按ids 查询所有商品价格
     */
    @RequestMapping("/sulingpxqg/commodity/list/byids")
    R listByIds(@RequestBody List<Long> params);

    /**
     * 按商品id集合 查询对应的商品数据
     */
    @RequestMapping("/sulingpxqg/commodity/list/commoditylist")
    R getCommodityList(@RequestBody List<Long> params);

    /**
     * 通过用户号也是店铺号获取店铺信息
     * @param buMemberUsername 用户号也是店铺号
     */
    @RequestMapping("/sulingpxqg/business/getbusiness")
    //@RequiresPermissions("sulingpxqg:business:info")
    R getBusiness(@RequestParam("buMemberUsername") String buMemberUsername);
}
